import java.util.Scanner;

public class One {
	public static void main(String[] args) {
		// 1、使用二维数组存储班上五个学生三门功课的考试成绩，要求输出每一个学生的总分、平均分、最高分、最低分
		float[][] scores = new float[5][3];
		Scanner input = new Scanner(System.in);
		for (int i = 0; i < scores.length; i++) {
			System.out.println("请输入第" + (i + 1) + "个学生的成绩：");
			for (int j = 0; j < scores[i].length; j++) {
				System.out.println("请输入第" + (i + 1) + "名学生第" + (j + 1) + "门成绩：");
				scores[i][j] = input.nextFloat();
			}
		}
		float avg = 0f;// 平均分
		float min = 0f;
		float max = 0f;
		float sum = 0f;
		for (int i = 0; i < scores.length; i++) {
			max = scores[i][0];
			min = scores[i][0];
			for (int j = 0; j < scores[i].length; j++) {
				sum += scores[i][j];
				if (scores[i][j] > max) {
					max = scores[i][j];
				}
				if (scores[i][j] < min) {
					min = scores[i][j];
				}
			}
			avg = sum / scores.length;
			System.out.println("第" + (i + 1) + "个班的总分为：" + sum);
			System.out.println("第" + (i + 1) + "个班的最高分为：" + max);
			System.out.println("第" + (i + 1) + "个班的最低分为：" + min);
			System.out.println("第" + (i + 1) + "个班的平均分为：" + avg);
			System.out.println("-----------------------------------------------------");
		}
	}
}
